package com.lanyou.esb.common;

public class CommonUtils {
	/**树节点类型：领域**/
	public static final String TREE_NODE_TYPE_FIELD="field";
	/**树节点类型：领域系统**/
	public static final String TREE_NODE_TYPE_FIELD_SYSTEM="fieldSystem";
	/**树节点类型：接口**/
	public static final String TREE_NODE_TYPE_SYSTEM_INTERFACE="systemInterface";
	
	public static final String COOK_PROXY_BUNDLE_NAME="Shenzhen Lanyou :: CookESB :: OSGI Proxy";
	public static final String JSON_START_SYMBOL = "{";
	public static final String JSON_END_SYMBOL = "}";
	public static final String JSON_ENTRY_SEPARATOR = ",";
	public static final String JSON_KEY_VALUE_SEPARATOR = ":";
	/** 访问日志表名固定部分 **/
	public static final String ACCESS_LOG_TABLE_NAME = "T_ESB_BU_ACCESS_LOG_M";
	public static final int CONCURRENCY_NUMBER_TIME_SEPARATOR = 1;
	public static final int SERVICE_TEST_RES_MSG_DEFAULT_LENGTH = 4096;
	public static final String MSG_SUFFER = " ......";
	public static final String BUNDLE_PROPS_REMOVE = "nfo";
	public static final String SOAP_ACTION_URI = "SOAPAction";
	public static final String SERIES_NAME_ALL = "全部";
	/** 密钥有效期 **/
	public static final int APPLY_KEY_INVALID_TIME = 5;
	// controller层返回消息字段名 start=====================
	/**总流量读数**/
	public static final String MSG_FIELD_VALUE_TOTAL = "valueTotal";
	/**成功次数读数**/
	public static final String MSG_FIELD_VALUE_S = "valueS";
	/**失败次数读数**/
	public static final String MSG_FIELD_VALUE_F = "valueF";
	/**最后一个区间总流量已读次数**/
	public static final String MSG_FIELD_LEFT_VALUE_4_TOTAL = "leftValue4Total";
	/**最后一个区间成功次数已读次数**/
	public static final String MSG_FIELD_LEFT_VALUE_4_S = "leftValue4S";
	/**最后一个区间失败次数已读次数**/
	public static final String MSG_FIELD_LEFT_VALUE_4_F = "leftValue4F";
	
	public static final String MSG_FIELD_ERR_MSG = "ErrMsg";
	public static final String MSG_FIELD_RESULT = "result";
	public static final String MSG_FIELD_MSG = "msg";
	public static final String MSG_FIELD_VALUE = "value";
	public static final String MSG_FIELD_TIME = "time";
	public static final String MSG_FIELD_KEY = "key";
	public static final String MSG_FIELD_TOTAL_KEY = "key4total";
	public static final String MSG_FIELD_SF_KEY = "key4sf";
	public static final String MSG_FIELD_SUCCESS = "success";
	public static final String MSG_FIELD_FAILURES = "failures";
	public static final String MSG_FIELD_TOTAL = "total";
	public static final String MSG_FIELD_ID = "id";
	public static final String MSG_FIELD_NAME = "name";
	public static final String MSG_FIELD_CONTENT = "content";
	public static final String MSG_FIELD_LASTTIMEPOINT = "lastTimePoint";
	/** 平台吞吐量吞吐率，最后一个区间时间点 **/
	public static final String MSG_FIELD_LEFTDATE = "leftDate";
	/** 平台吞吐量吞吐率，最后一个区间总量时间点 **/
	public static final String MSG_FIELD_LEFTDATE4TOTAL = "leftDate4Total";
	/** 平台吞吐量吞吐率，最后一个区间总量数据 **/
	public static final String MSG_FIELD_LEFTVALUE4TOTAL = "leftValue4Total";
	/** 平台吞吐量吞吐率，最后一个区间成功，失败时间点 **/
	public static final String MSG_FIELD_LEFTDATE4SF = "leftDate4SF";
	/** 平台吞吐量吞吐率，最后一个区间成功数 **/
	public static final String MSG_FIELD_LEFTVALUE4S = "leftValue4S";
	/** 平台吞吐量吞吐率，最后一个区间失败数 **/
	public static final String MSG_FIELD_LEFTVALUE4F = "leftValue4F";

	// controller层返回消息字段名 start=====================

	/** 接口告警平均响应时间区域 **/
	public static final int ALARM_AVG_TIME_SECTION = 6;

	/** 请求头标识符 **/
	public static final String PROXY_HEADER = "EsbHead";
	/** 密钥 **/
	public static final String APPLY_KEY = "ApplyKey";
	/** 接口编码 **/
	public static final String INTERFACE_CODE = "InterfaceCode";
	/** 接口ID **/
	public static final String INTERFACE_ID = "InterfaceId";
	/** 系统编码 **/
	public static final String SYSTEM_CODE = "SystemCode";
	/** 调用方系统编码 **/
	public static final String CALL_SYSTEM_CODE = "CallSystemCode";
	/** 调用方系统ID **/
	public static final String CALL_SYSTEM_ID = "CallSystemId";
	/** 接口版本 **/
	public static final String INTERFACE_VERSION = "InterfaceVersion";
	/** 访问令牌 **/
	public static final String ACCESS_TOKEN = "AccessToken";
	/** 请求时间单位 **/
	public static final String REQUEST_UNIT = "RequestUnit";
	/** 请求内容类型 **/
	public static final String CONTENT_TYPE = "Content-Type";

	// 传输格式
	public static final String CONTENTYPE_APP_SOAP_XML = "application/soap+xml; charset=utf-8";
	public static final String CONTENTYPE_TEXT_XML = "text/xml; charset=utf-8";
	public static final String CONTENTYPE_APP_JSON = "application/json; charset=utf-8";

	// 编码类型
	public static final String ENCODING_TYPE_UTF8 = "UTF-8";

	// 请求响应状态码
	public static final String RESPONDSE_STATUS_CODE = "statusCode";

	public static final String ACQUIRED_TOKEN_URI = "/oauth/token/servicetest";

	public static final String SERVICE_TEST_SUFFER = "servicetest";
	// 密钥，访问令牌分隔符
	public static final String KEY_SEPARATOR = "-";

	public static final String MSG_FIELD_SYSTEM_NOTFOUND = "找不到系统";
	public static final int CODE_FIELD_SYSTEM_NOTFOUND = 20001;

	public static final String MSG_INTERFACE_HTTP_NOTFOUND = "找不到接口";
	public static final int CODE_INTERFACE_HTTP_NOTFOUND = 20002;

	public static final String MSG_INTERFACE_HTTP_EMPTY = "接口不能为空";
	public static final int CODE_INTERFACE_HTTP_EMPTY = 20003;

	public static final String MSG_INTERFACE_HTTP_ACCESS_EXIST = "服务令牌已存在，不能重复申请";
	public static final int CODE_INTERFACE_HTTP_ACCESS_EXIST = 20004;

	public static final String MSG_INTERFACE_TOKEN_EMPTY = "密钥不能为空";
	public static final int CODE_INTERFACE_TOKEN_EMPTY = 20005;

	public static final String MSG_JSON_PARSING_ERROR = "json解析错误";
	public static final int CODE_JSON_PARSING_ERROR = 20006;

	public static final String MSG_CONNECT_REDIS_FAIED = "连接不上Redis服务器";
	public static final int CODE_CONNECT_REDIS_FAIED = 20007;

	public static final String MSG_UPDATE_REDIS_DATA_FAIED = "服务异常，更新Redis服务器数据失败！";
	public static final int CODE_UPDATE_REDIS_DATA_FAIED = 20008;

	/** 服务注册常量 **/
	public static final String MSG_CURRENT_IF_ALREADY_REGISTERED = "注册失败，当前接口编码已存在，请更改接口编码重新提交进行注册！";
	public static final int CODE_CURRENT_IF_ALREADY_REGISTERED = 20009;

	public static final String MSG_CALL_INTERFACES_FAIED = "调用servicemix接口异常！";
	public static final int CODE_CALL_INTERFACES_FAIED = 20010;

	public static final String MSG_UPLOAD_JAR_FILE_FAIED = "没有上传要注册的jar文件！";
	public static final int CODE_UPLOAD_JAR_FILE_FAIED = 20011;

	public static final String MSG_INTERFACE_CODE_EMPTY = "失败，接口编码不能为空！";
	public static final int CODE_INTERFACE_CODE_EMPTY = 20012;

	public static final String MSG_INTERFACE_NAME_EMPTY = "失败，接口名称不能为空！";
	public static final int CODE_INTERFACE_NAME_EMPTY = 20013;

	public static final String MSG_INTERFACE_VERSION_EMPTY = "失败，接口版本不能为空！";
	public static final int CODE_INTERFACE_VERSION_EMPTY = 20014;

	public static final String MSG_INTERFACE_REQUEST_PREMATER_EMPTY = "失败，接口请求参数报文不能为空！";
	public static final int CODE_INTERFACE_REQUEST_PREMATER_EMPTY = 20015;

	public static final String MSG_INTERFACE_OVERTIME_EMPTY = "失败，接口超时设置不能为空！";
	public static final int CODE_INTERFACE_OVERTIME_EMPTY = 20016;

	public static final String MSG_INTERFACE_ALRAM_THRESHOLD_EMPTY = "失败，接口请求告警阀值不能为空！";
	public static final int CODE_INTERFACE_ALRAM_THRESHOLD_EMPTY = 20017;

	public static final String MSG_INTERFACE_ALRAM_MAX_EMPTY = "失败，接口请求最大值不能为空！";
	public static final int CODE_INTERFACE_ALRAM_MAX_EMPTY = 20018;

	public static final String MSG_FORM_EMPTY = "失败，表单数据为空！";
	public static final int CODE_FORM_EMPTY = 20019;

	public static final String MSG_GET_SOAPACTIONURI_FAIED = "注册失败，获取soapAction请求头失败！";
	public static final int CODE_GET_SOAPACTIONURI_FAIED = 20020;

	public static final String MSG_CONNECT_SERVICEMIX_FAIED = "连接不上servicemix服务器";
	public static final int CODE_CONNECT_SERVICEMIX_FAIED = 20021;

	public static final String MSG_CONNECT_FTP_FAIED = "连接不上FTP服务器";
	public static final int CODE_CONNECT_FTP_FAIED = 20022;

	public static final String MSG_CONNOT_DELETE = "当前接口存在告警和工单，不允许卸载！";
	public static final int CODE_CONNOT_DELETE = 20023;

	public static final String MSG_CURRENT_IF_NAME_ALREADY_REGISTERED = "注册失败，当前接口名称已存在,请更改接口名称重新提交进行注册！";
	public static final int CODE_CURRENT_IF_NAME_ALREADY_REGISTERED = 20024;
	
	public static final String MSG_CREATE_FTP_RETOUTER_FAIED = "审核失败，创建FTP接口路由失败！";
	public static final int CODE_CREATE_FTP_RETOUTER_FAIED = 20025;
	
	public static final String MSG_START_FTP_RETOUTER_FAIED = "启用失败，启用FTP接口路由失败！";
	public static final int CODE_START_FTP_RETOUTER_FAIED = 20026;
	
	public static final String MSG_STOP_FTP_RETOUTER_FAIED = "停用失败，停用FTP接口路由失败！";
	public static final int CODE_STOP_FTP_RETOUTER_FAIED = 20027;
	
	public static final String MSG_UPDATE_FTP_RETOUTER_FAIED = "修改失败，修改FTP接口路由失败！";
	public static final int CODE_UPDATE_FTP_RETOUTER_FAIED = 20028;
	
	public static final String MSG_DEL_FTP_RETOUTER_FAIED = "卸载失败，卸载FTP接口路由失败！";
	public static final int CODE_DEL_FTP_RETOUTER_FAIED = 20029;
	
	public static final String MSG_NONE_SERVICE_MIX_SETTING = "ServiceMix服务节点配置信息缺失";
	public static final int CODE_NONE_SERVICE_MIX_SETTING = 20030;
	
	public static final String MSG_CURRENT_IF_NAME_ALREADY_EXISTS = "更新失败，当前接口名称已存在,请更改接口名称重新提交进行更新！";
	public static final int CODE_CURRENT_IF_NAME_ALREADY_EXISTS = 20031;
	
	public static final String MSG_CURRENT_UP_IF_NAME_ALREADY_EXISTS = "版本升级失败，当前接口名称已存在,请更改接口名称重新提交进行版本升级！";
	public static final int CODE_CURRENT_UP_IF_NAME_ALREADY_EXISTS = 20031;
	
	public static final int CODE_EXECUTE_IF_SQL_FAILD = 20032;

	public static final String SOAPENV = "soapenv";
	public static final String XMLNS = "xmlns";
	public static final String HEADER = "Header";
	public static final String BODY = "Body";

	public static final String SYMBOLIC_NAME = "Symbolic Name";

}
